package com.eboss.sbs.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.BaseAdapter;
import android.widget.ListView;

import com.eboss.sbs.R;
import com.eboss.sbs.activity.base.BaseActivity;
import com.eboss.sbs.adapter.CouponShopListAdapter;

import java.util.ArrayList;

public class CouponShopListAcvitiy extends BaseActivity {

	private ArrayList<String> names = new ArrayList<String>();
	private ListView lv;
	private BaseAdapter adapter;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		mActivity = this;
		setContentView(R.layout.activity_coupon_shoplist);
		super.onCreate(savedInstanceState);
		
		initView();
	}
	
	private void initView(){
		showView(R.id.titleback_btn_back, true);
		setTvText(R.id.tv_title, "活动店铺 ");
		names.addAll(getIntent().getStringArrayListExtra("names"));
		
		lv = (ListView) findViewById(R.id.listview);
		adapter = new CouponShopListAdapter(mActivity, names);
		lv.setAdapter(adapter);
		
		findViewById(R.id.titleback_btn_back).setOnClickListener(this);
	}
	
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
			case R.id.titleback_btn_back:
				finish();
				break;
			default:break;
		}
		super.onClick(v);
	}
	
}
